import yaml

##################################
#             数据生成             #
##################################


class GenerateData:
    pass


def load_yaml(file_path: str) -> dict:
    if file_path is None or not file_path.endswith(".yaml"):
        raise Exception("file type error")
    with open(file_path, "r", encoding="utf-8") as yaml_file:
        cfg = yaml.safe_load(yaml_file)
        return cfg
